﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Gronia.WPF;
namespace Gronia.Test
{
    /// <summary>
    /// Interaction logic for AlignedWrapPanelTest.xaml
    /// </summary>
    public partial class AlignedWrapPanelTest : Window
    {
        public AlignedWrapPanelTest()
        {
            InitializeComponent();
        }

        private void Checked(object sender, RoutedEventArgs e)
        {
            if (panel == null) return;
            if (chkHorizontal.IsChecked.Value)
            {
                panel.Orientation = Orientation.Horizontal;
            }
            else
            {
                panel.Orientation = Orientation.Vertical;
            }

            if (chkLeft.IsChecked.Value)
            {
                panel.HorizontalContentAlignment = HorizontalAlignment.Left;
            }
            else
            {
                panel.HorizontalContentAlignment = HorizontalAlignment.Right;
            }

            if (chkTop.IsChecked.Value)
            {
                panel.VerticalContentAlignment = VerticalAlignment.Top;
            }
            else
            {
                panel.VerticalContentAlignment = VerticalAlignment.Bottom;
            }

            if (chkReverse.IsChecked.Value)
            {
                panel.ChildOrder = ChildOrder.Reverse;
            }
            else
            {
                panel.ChildOrder = ChildOrder.Normal;
            }
        }
    }
}
